package com.fsquare.api.endpoint.shipping;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.broadleafcommerce.core.order.domain.FulfillmentOption;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

//import com.fsquare.shipping.service.ExtFulfillmentOptionService;

@Component
@Scope("singleton")
@Path("/shippingws/")
@Produces(value = { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Consumes(value = { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public class ShippingWS {
	
//	@Resource(name = "fsquareShippingService")
//	protected ExtFulfillmentOptionService shippingService;
//	
////	@RequestMapping(value = "/get", produces = "application/json", method = RequestMethod.GET)
////    @ResponseBody
//    @GET
//    public FulfillmentOption getShipping(HttpServletRequest request, HttpServletResponse response){
//		Map<String, Object> result = new HashMap<String, Object>();
//    	String optionId = request.getParameter("optionId");
//    	FulfillmentOption fulfillmentOption = shippingService.getShippingMethodById(Long.parseLong(optionId));
//    	result.put("fulfillmentOption", fulfillmentOption);
////    	result = getObjectMap(fulfillmentOption);
//		return fulfillmentOption;
//	}
}
